package com.renren.webmaven2.controllers;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * 
 * @date 2012-8-2
 * @version V1.0
 */
public abstract class LocalBaseController {

	protected Log logger = LogFactory.getLog(getClass());

	protected String getParameter(HttpServletRequest request, String para) {
		return request.getParameter(para);
	}

	protected int getParameterInt(HttpServletRequest request, String para) {
		String value = request.getParameter(para);
		if (StringUtils.isBlank(value)) {
			return 0;
		}
		return Integer.valueOf(value);
	}

}
